From 94552247809fafcf8e71a76cb0ec9b864c46836e Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 30 Dec 2009 12:46:16 +0000 Subject: [PATCH] libxl: define errors as an enum instead of define random values. Signed-off-by: Vincent Hanquez --- tools/libxl/libxl.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 7bfa4e5941..7318b5184d 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -226,10 +226,13 @@ typedef struct { bool power_mgmt; } libxl_device_pci; -#define ERROR_FAIL (-2) -#define ERROR_NI (-101) -#define ERROR_NOMEM (-1032) -#define ERROR_INVAL (-1245) +enum { + ERROR_VERSION = -1, + ERROR_FAIL = -2, + ERROR_NI = -3, + ERROR_NOMEM = -4, + ERROR_INVAL = -5, +}; /* context functions */ int libxl_ctx_init(struct libxl_ctx *ctx); -- 2.30.2